﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Exam.aspx.cs" Inherits="User_Exam" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>大学在线考试系统</title>
    <link href="../css/Common.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body {
            background-color: #9099ae;
        }

        .head {
            width: 100%;
            margin: 0px auto;
            height: 110px;
            background: url(../image/main_03.jpg);
        }

        .content {
            width: 100%;
            margin: 0px auto;
            height: auto;
            background-color: white;
        }

        .footer {
            width: 100%;
            margin: 0px auto;
            height: 50px;
            text-align: center;
        }

        .top {
            height: 26px;
            text-align: center;
            background: url(../image/answer.png);
            margin: 0px auto;
        }

        .top_content {
            height: 26px;
            margin: 0px auto;
            width: 100%;
            line-height: 26px;
        }

        #bottom {
            margin: 0px auto;
            height: 78px;
            margin-top: 100px;
        }

        .image {
            margin-top: 200px;
            float: right;
        }

        .s_if {
            width: 100%;
            height: 21px;
            margin: 0px auto;
            line-height: 21px;
            background-color: White;
            margin-bottom: 15px;
        }

        .ct {
            width: 100%;
            height: auto;
            border-bottom: 1px solid #bbb;
        }

        .button {
            width: 100%;
            height: 25px;
            margin: 0px auto;
            text-align: center;
            margin-top: 40px;
        }

        #e_box {
            margin: 0px auto;
            height: auto;
        }

        #paper {
            width: 100%;
            height: 150px;
            margin: 0px auto;
            background-color: White;
            border-bottom: 1px dotted #ddd;
        }

            #paper ul li {
                height: 25px;
                line-height: 25px;
            }

        #paper_head {
            width: 100%;
            height: 30px;
            margin: 0px auto;
            background-color: White;
            border-bottom: 1px dotted #ddd;
        }

        .head_img {
            margin-top: -7px;
            margin-left: -1px;
        }

        .style1 {
            height: 21px;
        }

        .asptable {
            padding: 15px;
            border: 1px solid #151515;
        }

        .asptitle {
            background-color: RGB(58,156,255);
            color: white;
            font-size: 18px;
            margin: 1px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="e_box">
            <div class="top">
                <div class="top_content">
                </div>
            </div>
            <div class="s_if">
            </div>
            <div id="paper_head">
                <img src="../image/exam_head.png" class="head_img" alt="" />
            </div>
            <div id="paper" style="font-size: 15px">
                <ul>
                    <li>
                        <asp:Label ID="Label30" runat="server" Text="Label" Font-Bold="True" Font-Size="Medium"></asp:Label>
                    </li>
                    <li>试卷编号：<asp:Label ID="Label31" runat="server" Text="Label"></asp:Label>
                    </li>
                    <li>出卷时间：<asp:Label ID="Label33" runat="server" Text="Label"></asp:Label>
                    </li>
                    <li>答题时间：<asp:Label ID="Label32" runat="server" Text="Label"></asp:Label>
                        <script language="JavaScript" type="text/javascript">
                            var tm = document.getElementById('Label32').innerText;
                            var maxtime = tm * 60 //一个小时，按秒计算，自己调整!   
                            function CountDown() {
                                if (maxtime >= 0) {
                                    minutes = Math.floor(maxtime / 60);
                                    seconds = Math.floor(maxtime % 60);
                                    msg = "距离考试结束还有" + minutes + "分" + seconds + "秒";
                                    document.getElementById("timer").innerHTML = msg;
                                    if (maxtime == 5 * 60) alert('注意，还有5分钟!');
                                    --maxtime;
                                }
                                else {
                                    clearInterval(timer);
                                    document.getElementById("ImageButton2").click();
                                    alert("时间到，结束!");
                                }
                            }
                            timer = setInterval("CountDown()", 1000);
                        </script>
                        分钟</li>
                    <li>试卷总分：<asp:Label ID="Label34" runat="server" Text="Label"></asp:Label>
                        分</li>
                </ul>

                <span id="timer" style="color: orangered; font-size: 22px; float: right;"></span>
            </div>
            <div class="clear">
            </div>
            <div class="content" style="font-size: 20px;">
                <div class="ct">
                    <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False"
                        EnableModelValidation="True" GridLines="None">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="asptitle">
                                        <asp:Label ID="Label24" runat="server" Text="一、单选题(每题"></asp:Label>
                                        <asp:Label ID="Label27" runat="server"></asp:Label>
                                        <asp:Label ID="Label25" runat="server" Text="分)"></asp:Label><br />
                                    </div>
                                </HeaderTemplate>

                                <ItemTemplate>
                                    <table id="Table2" cellspacing="1" cellpadding="1" width="100%" align="center" class="asptable">
                                        <tr>
                                            <td colspan="3" align="left" class="style1">
                                                <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex+1 %>'>									                </asp:Label>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Title","、{0}") %>'>									                </asp:Label>
                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Answer") %>' Visible="False"></asp:Label>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Mark") %>' Visible="False"
                                                    Height="18px"></asp:Label>
                                                <asp:Label ID="Label13" runat="server" Text='<%# Eval("TitleID") %>' Visible="False"
                                                    Height="18px"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="35%" align="left">
                                                <asp:Label ID="Label35" runat="server" Text="A."></asp:Label>
                                                <asp:RadioButton ID="RadioButton1" runat="server" Text='<%# Eval("AnswerA") %>' GroupName="Sl"></asp:RadioButton>
                                            </td>
                                            <td width="35%" align="left">
                                                <asp:Label ID="Label37" runat="server" Text="B."></asp:Label>
                                                <asp:RadioButton ID="RadioButton2" runat="server" Text='<%# Eval("AnswerB") %>' GroupName="Sl"></asp:RadioButton>
                                            </td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td width="35%" align="left">
                                                <asp:Label ID="Label36" runat="server" Text="C."></asp:Label>
                                                <asp:RadioButton ID="RadioButton3" runat="server" Text='<%# Eval("AnswerC") %>' GroupName="Sl"></asp:RadioButton>
                                            </td>
                                            <td width="35%" align="left">
                                                <asp:Label ID="Label38" runat="server" Text="D."></asp:Label>
                                                <asp:RadioButton ID="RadioButton4" runat="server" Text='<%# Eval("AnswerD") %>' GroupName="Sl"></asp:RadioButton>
                                            </td>

                                        </tr>
                                    </table>
                                </ItemTemplate>

                                <ItemStyle Height="30px" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle Font-Size="12pt" HorizontalAlign="Left" Height="25px" BorderStyle="None" />
                    </asp:GridView>
                </div>
                <div class="clear">
                </div>
                <div class="ct">
                    <asp:GridView ID="GridView2" runat="server" Width="100%" AutoGenerateColumns="False"
                        EnableModelValidation="True" GridLines="None">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="asptitle">
                                        <asp:Label ID="Label22" runat="server" Text="二、多选题(每题">									                </asp:Label>
                                        <asp:Label ID="Label28" runat="server">									                </asp:Label>
                                        <asp:Label ID="Label23" runat="server" Text="分)">  
                                      
                                        </asp:Label>
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <table id="Table3" cellspacing="1" cellpadding="1" width="100%" align="left" border="0" class="asptable">
                                        <tr>
                                            <td colspan="3" align="left">
                                                <asp:Label ID="Label5" runat="server" Text='<%# Container.DataItemIndex+1 %>'>									                </asp:Label>
                                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("Title","、{0}") %>'>									                </asp:Label>
                                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("Answer") %>' Visible="False"></asp:Label>
                                                <asp:Label ID="Label8" runat="server" Text='<%# Eval("Mark") %>' Visible="False"></asp:Label>
                                                  <asp:Label ID="Label60" runat="server" Text='<%# Eval("TitleID") %>' Visible="False"
                                                    Height="18px"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 22px" width="35%" align="left">
                                                <asp:Label ID="Label39" runat="server" Text="A."></asp:Label>
                                                <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("AnswerA") %>'></asp:CheckBox>
                                            </td>
                                            <td style="height: 22px" width="35%" align="left">
                                                <asp:Label ID="Label40" runat="server" Text="B."></asp:Label>
                                                <asp:CheckBox ID="CheckBox2" runat="server" Text='<%# Eval("AnswerB") %>'></asp:CheckBox>
                                            </td>
                                            <td style="height: 22px"></td>
                                        </tr>
                                        <tr>
                                            <td width="35%" align="left">
                                                <asp:Label ID="Label41" runat="server" Text="C."></asp:Label>

                                                <asp:CheckBox ID="CheckBox3" runat="server" Text='<%# Eval("AnswerC") %>'></asp:CheckBox>
                                            </td>

                                            <td width="35%" align="left">
                                                <asp:Label ID="Label42" runat="server" Text="D."></asp:Label>
                                                <asp:CheckBox ID="CheckBox4" runat="server" Text='<%# Eval("AnswerD") %>'></asp:CheckBox>
                                            </td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                                <HeaderStyle Height="25px" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle Font-Size="12pt" HorizontalAlign="Left" Height="25px" />
                    </asp:GridView>
                </div>
                <div class="clear">
                </div>
                <div class="ct">
                    <asp:GridView ID="GridView3" runat="server" Width="100%" AutoGenerateColumns="False"
                        PageSize="2" EnableModelValidation="True" GridLines="None">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="asptitle">
                                        <asp:Label ID="Label20" runat="server" Text="三、判断题(每题">									                </asp:Label>
                                        <asp:Label ID="Label29" runat="server">									                </asp:Label>
                                        <asp:Label ID="Label21" runat="server" Text="分)">                                            </asp:Label>
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <table id="Table4" cellspacing="1" cellpadding="1" width="100%" align="center" border="0" class="asptable">
                                        <tr>
                                            <td class="style1">
                                                <asp:Label ID="Label9" runat="server" Text='<%# Container.DataItemIndex+1 %>'>									                </asp:Label>
                                                <asp:Label ID="Label10" runat="server" Text='<%# Eval("Title","、{0}") %>'>									                </asp:Label>
                                                <asp:Label ID="Label11" runat="server" Text='<%# Eval("Answer") %>' Visible="False"></asp:Label>
                                                <asp:Label ID="Label12" runat="server" Text='<%# Eval("Mark") %>' Visible="False"></asp:Label>
                                                   <asp:Label ID="Label14" runat="server" Text='<%# Eval("TitleID") %>' Visible="False"></asp:Label>
                                            </td>
                                            <td width="13%">
                                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" name="RadioButtonList1"
                                                    RepeatDirection="Horizontal">
                                                    <asp:ListItem Value="true">正确</asp:ListItem>
                                                    <asp:ListItem Value="false">错误</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td>


                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle Font-Size="12pt" HorizontalAlign="Left" Height="25px" />
                    </asp:GridView>
                </div>
                <div class="clear">
                </div>
                <div class="ct">
                    <asp:GridView ID="GridView4" runat="server" Width="100%" AutoGenerateColumns="False"
                        PageSize="2" EnableModelValidation="True" GridLines="None">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <div class="asptitle">
                                        <asp:Label ID="Label51" runat="server" Text="四、问答题(每题">									                </asp:Label>
                                        <asp:Label ID="Label52" runat="server">									                </asp:Label>
                                        <asp:Label ID="Label53" runat="server" Text="分)">                                            </asp:Label>
                                    </div>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <table id="Table4" cellspacing="1" cellpadding="1" width="100%" align="center" border="0" class="asptable">
                                        <tr>
                                            <td class="style1">
                                                <asp:Label ID="Label54" runat="server" Text='<%# Container.DataItemIndex+1 %>'>									                </asp:Label>
                                                <asp:Label ID="Label55" runat="server" Text='<%# Eval("Title","、{0}") %>'>									                </asp:Label>
                                                <asp:Label ID="Label56" runat="server" Text='<%# Eval("Answer") %>' Visible="False"></asp:Label>
                                                <asp:Label ID="Label57" runat="server" Text='<%# Eval("Mark") %>' Visible="False"></asp:Label>
                                                <asp:Label ID="Label15" runat="server" Text='<%# Eval("TitleID") %>' Visible="False"></asp:Label>
                                               
                                               
                                            </td>`
                                            <td width="20%">
                                                <label>选择文件：</label>
                                                <asp:FileUpload ID="myupload" runat="server" />
                                            </td>


                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle Font-Size="12pt" HorizontalAlign="Left" Height="25px" />
                    </asp:GridView>
                </div>
                <div class="clear">
                </div>
                <div class="button">
                    <asp:ImageButton ID="ImageButton1" runat="server" OnClick="ImageButton1_Click" ImageUrl="~/image/Submit.GIF" />
                    <asp:ImageButton ID="ImageButton2" runat="server" OnClick="ImageButton2_Click" ImageUrl="~/image/quit.gif" />
                </div>
                <div class="clear">
                </div>
                <div id="bottom">
                </div>
            </div>
        </div>
    </form>
</body>
</html>
